// import com->alibaba->druid->DbType*;
// import com->alibaba->druid->sql->SQLUtils;
// import com->alibaba->druid->sql->ast->*;
// import com->alibaba->druid->sql->ast->expr->SQLIdentifierExpr;

// import java->util->std::list;
#pragma once

#include <string>
#include <list>

#include "../SQLExpr.h"
#include "../SQLExprImpl.h"
#include "../Object.h"
#include "../SQLObjectImpl.h"
#include "../SQLDbTypedObject.h"
#include "../SQLName.h"
#include "../SQLCommentHint.h"

#include "../expr/SQLIdentifierExpr.h"

#include "SQLConstraint.h"
#include "../../../DbType.h"

class SQLConstraintImpl
    : virtual public SQLObjectImpl,
      virtual public SQLConstraint,
      virtual public SQLDbTypedObject
{
public:
  DbType_ptr dbType;
  SQLName_ptr name;
  BOOL_ptr enable;
  BOOL_ptr validate;
  BOOL_ptr rely;
  SQLExpr_ptr comment;

  SQLCommentHint_list_ptr hints;

  SQLConstraintImpl();
  SHAREDOBJECT(SQLConstraintImpl);

  SQLCommentHint_list_ptr getHints();

  void setHints(SQLCommentHint_list_ptr hints);

  SQLName_ptr getName();

  void setName(SQLName_ptr name);

  void setName(string_ptr name);

  BOOL_ptr getEnable();

  void setEnable(BOOL_ptr enable);

  void cloneTo(SQLConstraintImpl_ptr x);
  void cloneTo(SQLConstraint_ptr x);

  BOOL_ptr getValidate();

  void setValidate(BOOL_ptr validate);

  BOOL_ptr getRely();

  void setRely(BOOL_ptr rely);

  DbType_ptr getDbType();

  void setDbType(DbType_ptr dbType);

  SQLExpr_ptr getComment();

  void setComment(SQLExpr_ptr x);

  void simplify();

  BOOL_ptr replace(SQLExpr_ptr expr, SQLExpr_ptr target);
};
